<?php

// NOTE: Make sure this file is not accessible when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'local');
$_SERVER['HTTP_ORIGIN'] = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '*';
defined('PEAR_PATH') or define('PEAR_PATH',__DIR__.'/../../../../pear/common');
require PEAR_PATH . '/vendor/autoload.php';
require PEAR_PATH . '/vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/../../common/config/bootstrap.php';
require __DIR__ . '/../config/bootstrap.php';

$config = yii\helpers\ArrayHelper::merge(
    require __DIR__ . '/../config/main.php',
    require __DIR__ . '/../../common/config/main-local.php',
    require __DIR__ . '/../config/main-local.php'
);

header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
header('Access-Control-Allow-Credentials:true');
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH');
header('Access-Control-Allow-Headers: X-Requested-With,Token');
(new yii\web\Application($config))->run();

